package org.plex.core;

import java.io.InputStream;
import java.util.List;

import org.plex.attachement.AttachmentInfo;

import com.adobe.idp.Document;

public interface AttachmentManager
{

	AttachmentInfo newAttachmentInfo();
	
	List<AttachmentInfo> getAllAttachments(long taskId);
	
	AttachmentInfo getAttachmentInfo(long taskId,long attachmentid);
	
	AttachmentInfo updateAttachmentInfo(long taskId,AttachmentInfo attachmentInfo);
	
	AttachmentInfo addAttachment(long taskId,AttachmentInfo attachmentInfo,InputStream attachmentStrem);
	
	AttachmentInfo addNote(long taskId,AttachmentInfo attachmentInfo);
	AttachmentInfo addAttachment(long taskId,AttachmentInfo attachmentInfo,Document attachmentDocument);
	
	AttachmentInfo addAttachment(long taskId,AttachmentInfo attachmentInfo,byte[]  attachmentBytes);
	
	void deleteAttachment(long taskId,long attachmentId);
	
	void updateAttachment(long taskId,long attachmentId,InputStream attachmentStream);
	
	void updateAttachment(long taskId,long attachmentId,Document attachmentDocument);
	
	void updateAttachment(long taskId,long attachmentId,byte[]attachentBytes);
	
	Document readAttachmentDocument(long taskID,long attachmentId);
	
	InputStream readAttachmentStream(long taskId,long attachmentId);
	
	byte[] readAttachmentBytes(long taskId,long attachmentId);
	
	String readFullNoteContent(long taskId,long attachmentId);
	
	void copyAttachmentsToTask(long taskId,List Attachmentlist);
	
	List<AttachmentInfo>  getAttachmentListForTask(long taskId);
	
	
}
